import request from '@/utils/request'

// 上传幼儿作品
export function uploadWorks(data) {
  return request({
    url: '/works',
    method: 'post',
    data
  })
}

// 按条件查询作品
export function getWorkLimt(data) {
  return request({
    url: '/works/list',
    method: 'post',
    data
  })
}
// 作品浏览
export function getWork(data) {
  return request({
    url: '/works/list',
    method: 'get',
    params: data
  })
}

// 获取学生列表
export function getStudents(data) {
  return request({
    url: '/student/list',
    method: 'post',
    data
  })
}

// 获取优秀作品
export function getExWorks(data) {
  return request({
    url: '/works/list',
    method: 'post',
    data
  })
}

// 修改作品等级
export function updateWorkGrade(wid, data) {
  return request({
    url: '/works/grade/' + wid,
    method: 'put',
    params: data
  })
}

// 设置作品在首页显示
export function showIndex(wid) {
  return request({
    url: '/works/home-page/' + wid,
    method: 'put'
  })
}
